@(signUpForm:Form[securesocial.controllers.Registration.RegistrationInfo])(implicit flash: play.api.mvc.Flash)
@import helper._
@implicitFieldConstructor = @{ FieldConstructor(securesocial.views.html.inputFieldConstructor.f) }

@securesocial.views.html.main( Messages("securesocial.signup.title") ) {
    <div class="page-header">
        <h1>Sign Up</h1>
    </div>

    @flash.get("error").map { msg =>
    <div class="alert alert-error">
        @Messages(msg)
    </div>
    }

    @helper.form(action = securesocial.controllers.routes.Registration.handleSignUp(), 'class -> "form-horizontal", 'autocomplete -> "off") {
        <fieldset>

            @helper.inputText(
                signUpForm("userName"),
                '_label -> Messages("securesocial.signup.username"),
                'class -> "input-xlarge"
            )

            @helper.inputText(
                signUpForm("fullName"),
                '_label -> Messages("securesocial.signup.fullName"),
                'class -> "input-xlarge"
            )

            @helper.inputText(
                signUpForm("email.email1"),
                '_label -> Messages("securesocial.signup.email1"),
                'class -> "input-xlarge"
            )

            @helper.inputText(
                signUpForm("email.email2"),
                '_label -> Messages("securesocial.signup.email2"),
                'class -> "input-xlarge"
            )

            @helper.inputPassword(
                signUpForm("password.password1"),
                '_label -> Messages("securesocial.signup.password1"),
                'class -> "input-xlarge"
            )

            @helper.inputPassword(
                signUpForm("password.password2"),
                '_label -> Messages("securesocial.signup.password2"),
                'class -> "input-xlarge"
            )

            <div class="form-actions">
                <button type="submit" class="btn btn-primary">@Messages("securesocial.signup.createAccount")</button>
                <a class="btn" href="@securesocial.controllers.routes.LoginPage.login()">@Messages("securesocial.signup.cancel")</a>
            </div>
        </fieldset>
    }
}